/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ec.socialfun.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author xavier
 */
@Entity
@Table(name = "redes_sociales")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "RedesSociales.findAll", query = "SELECT r FROM RedesSociales r"),
    @NamedQuery(name = "RedesSociales.findByRsCodigo", query = "SELECT r FROM RedesSociales r WHERE r.rsCodigo = :rsCodigo"),
    @NamedQuery(name = "RedesSociales.findByRsNombre", query = "SELECT r FROM RedesSociales r WHERE r.rsNombre = :rsNombre"),
    @NamedQuery(name = "RedesSociales.findByRsImagen", query = "SELECT r FROM RedesSociales r WHERE r.rsImagen = :rsImagen"),
    @NamedQuery(name = "RedesSociales.findByRsLink", query = "SELECT r FROM RedesSociales r WHERE r.rsLink = :rsLink"),
    @NamedQuery(name = "RedesSociales.findByRsClave", query = "SELECT r FROM RedesSociales r WHERE r.rsClave = :rsClave")})
public class RedesSociales implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "RS_CODIGO")
    private Integer rsCodigo;
    @Basic(optional = false)
    @Column(name = "RS_NOMBRE")
    private String rsNombre;
    @Column(name = "RS_IMAGEN")
    private String rsImagen;
    @Column(name = "RS_LINK")
    private String rsLink;
    @Basic(optional = false)
    @Column(name = "RS_CLAVE")
    private String rsClave;

    public RedesSociales() {
    }

    public RedesSociales(Integer rsCodigo) {
        this.rsCodigo = rsCodigo;
    }

    public RedesSociales(Integer rsCodigo, String rsNombre) {
        this.rsCodigo = rsCodigo;
        this.rsNombre = rsNombre;
    }

    public Integer getRsCodigo() {
        return rsCodigo;
    }

    public void setRsCodigo(Integer rsCodigo) {
        this.rsCodigo = rsCodigo;
    }

    public String getRsNombre() {
        return rsNombre;
    }

    public void setRsNombre(String rsNombre) {
        this.rsNombre = rsNombre;
    }

    public String getRsImagen() {
        return rsImagen;
    }

    public void setRsImagen(String rsImagen) {
        this.rsImagen = rsImagen;
    }

    public String getRsLink() {
        return rsLink;
    }

    public void setRsLink(String rsLink) {
        this.rsLink = rsLink;
    }

    public String getRsClave() {
        return rsClave;
    }

    public void setRsClave(String rsClave) {
        this.rsClave = rsClave;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (rsCodigo != null ? rsCodigo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RedesSociales)) {
            return false;
        }
        RedesSociales other = (RedesSociales) object;
        if ((this.rsCodigo == null && other.rsCodigo != null) || (this.rsCodigo != null && !this.rsCodigo.equals(other.rsCodigo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ec.socialfun.entidades.RedesSociales[ rsCodigo=" + rsCodigo + " ]";
    }
}
